﻿using System.Net;
using AngryManagementMayhem.Content.Textures.MainMenu;
using AngryManagementMayhem.Controller.NetworkObject;
using Transformable_Engine_v2.Engine.GameObjects.Containers;
using Transformable_Engine_v2.Engine.GameObjects.Containers.Transformable_controls;
using Transformable_Engine_v2.Engine.GameObjects.Primitives;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace AngryManagementMayhem.GameCode.Screens.MainMenuScreen.MainMenuObjects
{
    public class GameListItem : Container
    {
        public GameListItem(IPEndPoint sender, SearchGameResponse gameDescription)
        {
            AddChildren(new RectanglePrimitive
                {
                    Shape = new TE_Rectangle(0, 0, 42, 2),
                    FillColor = new Color(42, 42, 42)
                });

            AddChildren(new Label(MainMenuSpriteSheet.GetSprite, gameDescription.GameName)
                {
                    PositionGridBound = new TE_Vector2(3, 1),
                    TextAlign = TE_Rectangle.Alignment.CenterLeft
                });
        }
    }
}